testnotebookdnd: Defer deletion to an idle
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Jan 2015 14:20:04 +0000 (09:20 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 30 Jan 2015 15:13:28 +0000 (10:13 -0500)
commit34c29d8d3cfd85132a7e8c333ffb4353771cfe64
treed21578b7bceb070b80b1e20e5f6c8524a289b77a
parent3fc21b4f3f2d7764b00939961fb38af9b552b6ab
testnotebookdnd: Defer deletion to an idle

The code here was always a bit buggy: We removed the tab from
the notebook in a ::drag-data-received handler. But with
GTK_DEST_DEFAULT_DROP, that signal is emitted before we inform
the source side that the drag is finished. With its improved drag
handling, GtkNotebook now interprets this as a 'spontaneous'
removal of the tab being dragged, and cancels the drag, leading
to an unwanted cancel animation.

The easiest fix is to just defer the tab removal to an idle.
tests/testnotebookdnd.c